package cn.itcast.consumer.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 虎哥
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    private Object data;
    private boolean flag;

    public static Result ok(Object data){
        return new Result(data, true);
    }

    public static Result error(Object data){
        return new Result(data, false);
    }
}
